#pragma once


// CDownloadJobsWnd

#include "SocketTracker.h"
#include "MemDC.h"

class CDownloadJobsListCtrl : public CListCtrl
{

public:
	virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
private:
	VOID InitItemMemDC(CMemoryDC* dc, LPDRAWITEMSTRUCT lpDrawItemStruct);
	VOID GetItemDisplayText(CDownloadJob* pJob, int nSubItem, LPTSTR lpStr, int nTextMax);
private:
	DWORD m_uClrHighlight;
	DWORD m_uClrNoHighlight;
	DWORD m_uClrHighlightText;
	DWORD m_uClrWindowText;
};

class CDownloadJobsWnd : public CDockablePane
{
	DECLARE_DYNAMIC(CDownloadJobsWnd)

public:
	CDownloadJobsWnd();
	virtual ~CDownloadJobsWnd();

protected:
	DECLARE_MESSAGE_MAP()
	CDownloadJobsListCtrl m_lvJobs;
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	VOID SetRelatedProcessID(DWORD uProcessID);
	VOID AddJob(CDownloadJob* pJob);
	VOID DeleteJob(CDownloadJob* pJob);
};


